package main.service;

import java.util.*;
import java.math.BigDecimal;
import org.springframework.stereotype.Service;

import com.cn.ts.deal.ArchWebServiceImplV5;
import com.cn.ts.deal.ArchWebServiceImplV5Service;
import com.cn.ts.deal.MidDocArchiveV5;
import com.cn.ts.deal.MidProjArchiveV5;
import com.cn.ts.deal.MidVolArchiveV5;
import com.cn.ts.deal.MidVolDocArchiveV5;
import com.cn.ts.deal.ProjVolDocArchiveV5;

import org.springframework.data.domain.Page;
import main.model.*;
import main.dao.*;
import main.vo.*;


@Service
public class WsdlUserService {


//系统生成代码,请不要修改或删除 <actionStart:wsdl>
public List<Wsdl> wsdl(String ProjRid,String ProjTitle,String VolRid,String VolTitle,String DocRid,String DocTitle,String attachment) throws Exception {
	//请添加你的业务代码
	ProjVolDocArchiveV5 projVolDocArchive = new ProjVolDocArchiveV5();
    //基本信息
    projVolDocArchive.setAppid("email");
    projVolDocArchive.setApptoken("email");
    projVolDocArchive.setCompanycode("32");
    projVolDocArchive.setFondsname("中国能源建设集团江苏省电力设计院有限公司");

    //项目档案信息
    MidProjArchiveV5 midProjArchiveV5 = new MidProjArchiveV5();
    midProjArchiveV5.setRid(ProjRid);
    midProjArchiveV5.setTitle(ProjTitle);

//        //案卷档案信息
    MidVolDocArchiveV5 midVolDocArchiveV5 = new MidVolDocArchiveV5();
    MidVolArchiveV5 midVolArchiveV5 = new MidVolArchiveV5();
    midVolArchiveV5.setRid(VolRid);
    midVolArchiveV5.setTitle(VolTitle);
    midVolDocArchiveV5.setVolArchiveV5(midVolArchiveV5);
//
//        文件档案信息
    MidDocArchiveV5 midDocArchiveV5 = new MidDocArchiveV5();
    midDocArchiveV5.setRid(DocRid);
    midDocArchiveV5.setTitle(DocTitle);
    midDocArchiveV5.setAttachment(attachment);

    midVolDocArchiveV5.getDocArchiveV5List().add(midDocArchiveV5);
    projVolDocArchive.setProjArchiveV5(midProjArchiveV5);
    projVolDocArchive.getMidVolDocArchiveV5List().add(midVolDocArchiveV5);
//        midProjArchiveV5.
    //调用项目案卷文件归档接口

    ArchWebServiceImplV5Service archWebServiceImplV5Service = new ArchWebServiceImplV5Service();
    ArchWebServiceImplV5 archWebServiceImplV5Port = archWebServiceImplV5Service.getArchWebServiceImplV5Port();
    String resultStr = archWebServiceImplV5Port.receiveProjVolDocArchiveV5(projVolDocArchive);


//        String resultVal = TestArchiveService.receiveProjVolDocArchiveV5(projVolDocArchive);
    System.out.println("调用归档案卷接口获取返回数据为:"+resultStr);
    List<Wsdl> list = new ArrayList<>();
    Wsdl wsdl = new Wsdl();
    wsdl.setReturnResult(resultStr);
    list.add(wsdl);
    return list;
}
//系统生成代码,请不要修改或删除 <actionEnd:wsdl>


}